Logical disjunction
Makes a logical disjunction between masks.
🎭 Mask options and parameters of or
method
or
method performs a logical disjunction between bits of two masks.
It works like this:
let mask = new Mask(3, 3, data: new Uint8Array([1, 1, 1, 1, 1, 1, 0, 0, 0]));
let mask2 = new Mask(3, 3, data: new Uint8Array([0, 0, 0, 1, 1, 1, 1, 1, 1]));
const orMask = mask.or(mask2);
// expect orMask to equal [1,1,1,1,1,1,1,1,1]
caution
Masks must have the same size for compatibility reasons.
Parameters and default values
-
mask
-
options
Options
Property | Required | Default value |
---|---|---|
out | no | - |